package com.pw.study.client;

import com.pw.study.service.SequenceStack;

import java.util.Stack;

/**
 * @program: javastudy
 * @description: Stack栈测试
 * @author: future
 * @create: 2020-08-30 23:26
 **/
public class StackClient {
    public static void main(String[] args) {
        Stack s2 = new Stack();
        Integer[] arr ={1,2,3,4,5};
        SequenceStack s = new SequenceStack(10);
        for (int i = 0; i <arr.length ; i++) {
            System.out.println(arr[i]);
            Object o=new Object();

            s.push(arr[i]);
        }
        Integer a= (Integer) s.getHead();
        System.out.println(a);
        for (int i = 0; i <s.size() ; i++) {
            s.pop();
        }
    }

}
